package com.kerpow.KSheet;

import android.database.Cursor;

import com.kerpow.KSheet.character.CharacterAdapter;


public class CharacterNote {
	public String Note="";
	public long CharacterID=0;
	public long ID=0;
	public String Modified="";
	
	public CharacterNote(){
	
	}
	public CharacterNote(long characterID, String note, String modified){
		Note = note;
		CharacterID = characterID;
		Modified = modified;
	}
	
	public static CharacterNote from(Cursor c){
		CharacterNote n = new CharacterNote();
		n.ID = c.getLong(c.getColumnIndex(CharacterAdapter.FIELD_NOTES_ID));
		n.Note = c.getString(c.getColumnIndex(CharacterAdapter.FIELD_NOTES_NOTE));
		n.CharacterID = c.getLong(c.getColumnIndex(CharacterAdapter.FIELD_NOTES_CHARACTERID));
		n.Modified = c.getString(c.getColumnIndex(CharacterAdapter.FIELD_NOTES_MODIFIED));
		
		return n;		
	}
}
